<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <h:head>
        <title>Menu Page</title>
    </h:head>
    <h:body>
        <h:form>
            <p:panel header="Main" style="margin-bottom:5px">
                <h:panelGrid columns="1" cellpadding="3">
                    <h:outputText value="User name: " />
                    <p:link outcome="homePage" value="Log out*">
                        <f:param name="productId" value="10" />
                    </p:link>
                    <p:separator />
                    <p:button outcome="homePage" value="MyCalendar" icon="fa-home"/>
                    <h:panelGrid columns="2" cellpadding="3">
                        <h:outputText  value="Notifications: " style="font-weight: bold" />
                        <h:outputText id="notifCounter" value="#{checkerNotifications.number}" />
                        <p:poll id="pollNotification" interval="1" listener="#{checkerNotifications.increment}" 
                                update="notifCounter" />
                    </h:panelGrid>
                    <p:button outcome="notifications" value="View notifications" icon="ui-icon-star"/>
                    <p:button outcome="accountSettings" value="Account setting" icon="fa-user"/>
                </h:panelGrid>
            </p:panel>

            <p:panel header="Public" style="margin-bottom:5px">
                <h:panelGrid columns="1" cellpadding="3">
                    <p:button outcome="publicCals" value="Public calendars"/>
                    <p:button outcome="publicEvents" value="Public events" />
                </h:panelGrid>
            </p:panel>

            <p:panel header="Other" style="margin-bottom:5px">
                <h:panelGrid columns="1" cellpadding="3">
                    <p:commandButton value="Report issue" onclick="PF('issueDialog').show();" />
                    <p:commandButton value="Share with a friend" type="button" onclick="PF('shareDialog').show();" />
                </h:panelGrid>
            </p:panel>   
        </h:form>
    </h:body>
</html>

